@layout("/common/_container.html",{bg:"bg-white", plugins:["ztree"],css:["/assets/modular/frame/user_info.css"],js:["/assets/business/category/category_add.js"]}){
<form id="deptForm" lay-filter="deptForm" class="layui-form model-form">
    <input name="deptId" type="hidden"/>
    <div class="layui-form-item">
        <label class="layui-form-label">名称<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input name="name" placeholder="请输入名称" type="text" class="layui-input" lay-verify="required" required/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">上级名称<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="pid" name="pid" type="hidden" value="${parent.categoryId}">
            <input id="pName" name="pName" type="text" disabled value="${parent.name}" class="layui-input" lay-verify="required" autocomplete="off"/>
        </div>
    </div>
    @if(parent.level >= 2){
    <div class="layui-form-item">
        <label class="layui-form-label">是否自动</label>
        <div class="layui-input-block">
            <input type="checkbox" name="autoStatus" ${parent.autoStatus == 1 ? 'checked': ''} lay-skin="switch" lay-filter="switchTest" lay-text="是|否">
        </div>
    </div>
    <div class="layui-form-item" id="autoClassDisplay" style=${parent.autoStatus == 1 ? 'display:block': 'display:none'}>
    <label class="layui-form-label">自动执行方法</label>
    <div class="layui-input-block">
        <input name="autoClass" id="autoClass" placeholder="请输入方法" type="text" class="layui-input"/>
    </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">卡号长度</label>
        <div class="layui-input-block">
            <input name="cardNOLength" placeholder="请输入卡号长度" lay-verify="required|number"  type="number" class="layui-input"/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">卡密长度</label>
        <div class="layui-input-block">
            <input name="cardPasswordLength" placeholder="请输入卡密长度" lay-verify="required|number" type="number" class="layui-input"/>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">回收折扣（只作显示）</label>
        <div class="layui-input-block">
            <input name="recoverRate" placeholder="请输入卡号长度（0.XX）" lay-verify="required|number"  type="number" class="layui-input"/>
        </div>
    </div>
    @}
    <div class="layui-form-item">
        <label class="layui-form-label">背景颜色</label>
        <div class="layui-input-block">
            <input name="backColor" id="backColor" placeholder="请输入背景颜色" type="text" class="layui-input"/>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <input name="description" placeholder="请输入备注" type="text" class="layui-input"/>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">图标</label>
            <div class="layui-text" style="float: left;text-align: center">
                <div class="user-info-head" id="imgHead" style="background-color: #F56C6C">
                    <img id="iconView"/>
                </div>
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">透明图标</label>
            <div class="layui-text" style="float: left;text-align: center">
                <div class="user-info-head" id="touImgHead" style="background-color: #F56C6C">
                    <img id="touImgView"/>
                </div>
            </div>
        </div>
        <input name="picture" id="picture" type="hidden" lay-verify="required"/>
        <input name="touImg" id="touImg" type="hidden"/>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-block">
            <input name="sort" placeholder="请设置排序" type="text" class="layui-input"/>
        </div>
    </div>
    <div class="layui-form-item text-right">
        <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
        <button class="layui-btn" lay-filter="btnSubmit" lay-submit>保存</button>
    </div>
</form>
@}
